package com.chenjt.springai.ten_multiModal.entity.vo;


import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.ai.chat.messages.Message;

/**
 * 注释：
 *
 * @author chenjt
 * @date 2025/5/28 16:53
 */
@Data
@NoArgsConstructor
public class MessageVO {

    private String role;

    private String content;

    public MessageVO(Message message){
        switch (message.getMessageType()){
            case USER:
                role = "user";
                break;
            case ASSISTANT:
                role = "assistant";
                break;
            default:
                role = "";
            break;
        }
        this.content = message.getText();

    }

}
